package org.example.demo20240914.controller;

import jakarta.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ControllerRequest {
    @RequestMapping("/simpleParam")
    public String simpleParam(HttpServletRequest data){
        String name=data.getParameter("name");
        String age1=data.getParameter("age");
        int age=Integer.parseInt(age1);
        System.out.println(name+" "+age);
        return "OK";
    }
}
